package com.fengxing.ams.web.facade;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fengxing.ams.web.facade.intf.IUserResourceFacade;
import com.fengxing.ams.web.facade.mouble.resource.IUserResourceDAO;
import com.fengxing.ams.web.facade.mouble.resource.UserResourceVO;

@Service
@Transactional
public class UserResourceFacade implements IUserResourceFacade {

	@Autowired
	private IUserResourceDAO userResourceDAO;

	@Override
	public UserResourceVO getResource(Long userId, String type) {
		return this.userResourceDAO.findByUserId(userId, type);
	}

	@Override
	@Transactional(readOnly = false)
	public void userResource(Long userId, String solution) {
		this.userResourceDAO.userResource(userId, solution);
	}

}